﻿using SqlSugar;
using Zhp.SqlSugar.Entity;

namespace Zhp.Workflow.Entity.DataOptions
{
    [SugarTable("Sys_User")]
    public class SysUser : BaseEntity<long>
    {
        /// <summary>
        /// 用户账号
        /// </summary>
        [SugarColumn(ColumnDataType = "nvarchar", Length = 255, IsNullable = false, ColumnDescription = "用户账号")]
        public string UserCode { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        [SugarColumn(ColumnDataType = "nvarchar", Length = 255, IsNullable = true, ColumnDescription = "昵称")]
        public string UserName { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 255, IsNullable = true, ColumnDescription = "邮箱")]
        public string Email { get; set; }

        /// <summary>
        /// 是否内置管理员
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "内置管理员,无视系统权限")]
        public bool IsAdmin { get; set; }
        /// <summary>
        /// 是否激活
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "是否激活")]
        public bool IsEnabled { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 255, IsNullable = true, ColumnDescription = "密码")]
        public string Password { get; set; }

        /// <summary>
        /// 签名随机盐
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 255, IsNullable = true, ColumnDescription = "随机盐值")]
        public string SaltKey { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        [SugarColumn(ColumnDataType = "bigint", IsNullable = true, ColumnDescription = "部门ID")]
        public long DeptId { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 11, IsNullable = true)]
        public string Phone { get; set; }

        /// <summary>
        /// 头像名称
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 255, IsNullable = true, ColumnDescription = "头像名称")]
        public string AvatarName { get; set; }
        /// <summary>
        /// 头像路径
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar", Length = 255, IsNullable = true, ColumnDescription = "头像路径")]
        public string AvatarPath { get; set; }
        /// <summary>
        /// 最后修改密码时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? PasswordReSetTime { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "性别")]
        public bool Sex { get; set; }

        [SugarColumn(ColumnDataType = "varchar", Length = 255, IsNullable = true, ColumnDescription = "性别")]
        public string Gender { get; set; }

        [SugarColumn(ColumnDataType = "varchar", Length = 30, IsNullable = true, ColumnDescription = "微信用户唯一标识")]
        public string OpenId { get; set; }

    }
}
